<%@ include file="/jsp/common/tagLibs.jsp"%>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/admin/userDetails.js"></script>
<DIV class=content_division>
	<DIV class=content_container>
	<DIV class=cleardiv></DIV>
		<DIV class=content_left_shadow>
			<DIV class=content_right_shadow>
				<DIV class=under_flash_shadow></DIV>
				<!-- CONTENT START -->
				<DIV class=content_inner_container>
							<DIV class=cleardiv></DIV>
						   
							<form:form commandName="userDetailsVO" id="columnarForm" action="">
							<DIV class=cleardiv></DIV>
							<!-- MAINCOL START -->
							<DIV id="leftDiv" class=maincol style="MARGIN-TOP: 20px; width:280px;">
								<div>
									<DIV class=button_orange>
										<DIV class=bo_left></DIV>
										<DIV class=bo_mid>User Details</DIV>
										<DIV class=bo_right></DIV>
									</DIV>
									<DIV class=text_container>
											<fieldset style="border:0px;">
												<label class="first" for="street1">
													User Name:
													<c:choose>
													<c:when test="${not empty update}">
													<form:input id="username" path="selectedUser.username" disabled="true" cssClass="input jFocus"  />
													</c:when>
													<c:otherwise>
													<form:input id="username" path="selectedUser.username" cssClass="input jFocus"  />
													</c:otherwise>
													</c:choose>													
												</label>
												<label for="city1">
													Password:
													<form:password id="password" path="selectedUser.password" cssClass="input jFocus" size="50" />
												</label>
												<label for="city1">
													Confirm Password:
													 <input type="password" name="password-check" id="password-check" class="input jFocus" value="" size="50" />
												</label>
												<label for="city1">
												Role:
												<form:select cssStyle="width:200px;display:inline;" path="selectedUserAuthority.authority" items="${roleList}" itemLabel="roleName" itemValue="roleCode"></form:select>
												<input type="hidden" name="validation" id="validation"/>												
												</label>
												<label for="city1">
													<c:if test="${not empty updated}">
													<span class="error" style="color: red">User updated successfully.</span>
													</c:if>	
												</label>												
											</fieldset>
									</DIV>
								</div>
							</DIV><!-- MAINCOL END -->
							<!-- RIGHTCOL START -->
							<DIV id="rightDiv" class=rightcol style="width:550px;">
								<DIV class=rightcol_content_spacer></DIV>
								<DIV>
									<DIV>
										<DIV class=button_orange>
											<DIV class=bo_left></DIV>
											<DIV class=bo_mid>Choose Bank</DIV>
											<DIV class=bo_right></DIV>
										</DIV>
										<DIV class=text_container>
											<table style="color: #804500;" CELLSPACING="15" >
												<tr>
													<th>Available Banks</th>
													<th></th>
													<th>Selected Banks</th>
												</tr>
												<tr>
												<td>
													<form:select id="from_select_list" cssStyle="width:200px;display:inline;height:400px;" multiple="multiple" path="bankDetailsIDs" items="${userDetailsVO.bankDetailsList}" itemLabel="bankname" itemValue="bankcode"></form:select>													
												</td>
												<td valign="middle">
													<a href="#" style="font-size: 200%;" onclick="move_list_items('from_select_list','to_select_list');">&gt;</a>
													<br/>
													<a href="#" style="font-size: 200%;"  onclick="move_list_items_all('from_select_list','to_select_list');">&gt;&gt;</a>
													<br/>
													<a href="#" style="font-size: 200%;"  onclick="move_list_items('to_select_list','from_select_list');">&lt;</a>
													<br/>
													<a href="#" style="font-size: 200%;"  onclick="move_list_items_all('to_select_list','from_select_list');">&lt;&lt;</a>
												</td>												
												<td>
													<form:select id="to_select_list" cssStyle="width:200px;display:inline;height:400px;" multiple="multiple" path="selectedBankIDs" items="${userDetailsVO.selectedBanks}" itemLabel="bankName" itemValue="bankcode"></form:select>													
												</td>												
												</tr>
											</table>
										</DIV>
									</DIV>
								</DIV>
							</DIV>
							<!-- RIGHTCOL END -->
							<DIV class=cleardiv></DIV>
							<div>
    							<input value="Update" type="submit" class="button" id="updateBtn"/> 
								<input value="Cancel" type="submit" class="button" id="cancelBtn"/>
							</div>
							<DIV class=cleardiv></DIV>
							</form:form>  
							<br/><br/><br/>
						</DIV>
				<!-- CONTENT END -->
			</DIV>
		</DIV>
		<DIV class=cleardiv></DIV>
	</DIV>
</DIV>